#include <stdio.h>

int main() {
	int N, a = 2, b = 0, c = 0, i = 1;
	scanf("%d", &N);
	if (N > 1) {
		while (c < 2 * N) {
			c = a + b;
			b = a;
			a = c;
			i++;
		}
		printf("%d", i);
	} else
		printf("1");

	return 0;
}
